package com.axjy.mapper;

import com.axjy.pojo.RolePermission;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface RolePermissionMapper extends BaseMapper<RolePermission> {

    @Select("select perm_id from smbms_role_permission ${ew.customSqlSegment}")
    List<Integer> findPermIdList(@Param(Constants.WRAPPER) Wrapper wrapper);

    @Select("select perm_id from smbms_role_permission where role_id=#{roleId}")
    List<Integer> findPermIdList(Integer roleId);
}
